//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __CDATAINPUTSTREAM_H__
#define __CDATAINPUTSTREAM_H__
#include "_CDataInputStream.h"

CarClass(CDataInputStream)
{
public:
    CARAPI Available(
        /* [out] */ Int32 * pBytes);

    CARAPI Close();

    CARAPI Mark(
        /* [in] */ Int32 readLimit);

    CARAPI IsMarkSupported(
        /* [out] */ Boolean * pSupported);

    CARAPI Read(
        /* [out] */ Byte * pValue);

    CARAPI ReadBuffer(
        /* [out] */ BufferOf<Byte> * pBuffer);

    CARAPI ReadBufferEx(
        /* [in] */ Int32 offset,
        /* [in] */ Int32 length,
        /* [out] */ BufferOf<Byte> * pBuffer);

    CARAPI Reset();

    CARAPI Skip(
        /* [in] */ Int32 length);

    CARAPI ReadInt16(
        /* [out] */ Int16 * pValue);

    CARAPI ReadInt32(
        /* [out] */ Int32 * pValue);

    CARAPI ReadInt64(
        /* [out] */ Int64 * pValue);

    CARAPI ReadFloat(
        /* [out] */ Float * pValue);

    CARAPI ReadDouble(
        /* [out] */ Double * pValue);

    CARAPI ReadAChar(
        /* [out] */ AChar * pValue);

    CARAPI ReadWChar(
        /* [out] */ WChar * pValue);

    CARAPI ReadBoolean(
        /* [out] */ Boolean * pValue);

    CARAPI ReadEMuid(
        /* [out] */ EMuid * pValue);

    CARAPI ReadEGuid(
        /* [out] */ EGuid * pValue);

    CARAPI ReadECode(
        /* [out] */ ECode * pValue);

    CARAPI constructor(
        /* [in] */ IInputStream * pStream);

    ~CDataInputStream();

    CDataInputStream() : m_pIis(NULL) {}

private:
    IInputStream * m_pIis;
};

#endif // __CDATAINPUTSTREAM_H__
